package Effects;

import Entities.RPGEntity;

/**
 * Interface to spread out to Debuffs & Buffs
 * @author Phil, Hetalar
 * 09/02/2012
 */
public interface Effect 
{	
	//Buffs (0-99
	public final static int BUFF_ID_CUTOFF = 100;
	public final static int BUFF_HP_INCREASE = 0;
	
	//Debuffs (100-199)
	public final static int DEBUFF_HP_DECREASE = 100;
	
	/**
	 * Applies some buff/debuff/skill
	 * @param target Target Player/Enemy
	 */
	public void applyEffect();
	
	/**
	 * Removes some buff/debuff/skill
	 * @param target Target Player/Enemy
	 */
	public void removeEffect();

	/**
	 * Attempts to merge 2 of the same effects together.
	 * @param other Effect to merge
	 */
	public void merge(Effect other);
	
	/**
	 * Checks to see if the buff is currently active on the host.
	 * @return True if it is, false otherwise.
	 */
	public boolean isApplied();
	
	/**
	 * Gets the power of the current effect.
	 * @return the power of the current effect.
	 */
	public double getPower();
	
	/**
	 * Sets the power of the current effect
	 * @param newPower to set.
	 */
	public void setPower(double newPower);
	
	/**
	 * Sets the new host for the effect.
	 * @param host new host.
	 */
	public void setHost(RPGEntity host);
	
	/**
	 * Checks to see if this effect has a host.
	 * @return true if it does, false if it doesn't
	 */
	public boolean hasHost();
	
	/**
	 * Gets the ID of the effect
	 * @return ID of this effect.
	 */
	public int getID();
	
	/**
	 * Gets the name of the Effect
	 * @return the name of the effect.
	 */
	public String getName();
	
	/**
	 * Generates a unique key for this Effect.
	 * @return a unique key
	 */
	public String getKey();
	
	/**
	 * Checks to see whether or not this effect can be merged
	 * together with the same type of buff.
	 * @return true if it can, false otherwise.
	 */
	public boolean isMergeable();
}
